ALTER TABLE CustomerBetting ADD TeamAAmount decimal(18,0)
GO
ALTER TABLE CustomerBetting ADD TeamBAmount decimal(18,0)
GO
ALTER TABLE CustomerBetting ADD DrawAmount decimal(18,0)
GO


SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

SET ANSI_PADDING ON
GO

CREATE TABLE [dbo].[MatchResults](
	[Id] [int] IDENTITY(1,1) NOT NULL,
	[MatchTypeId] [int] NULL,
	[MatchScheduleId] [int] NULL,
	[BettingTypeId] [int] NULL,
	[TeamAAmount] [decimal](18, 0) NULL,
	[TeamBAmount] [decimal](18, 0) NULL,
	[Over] [decimal](18, 0) NULL,
	[Runs] [decimal](18, 0) NULL,
	[CreatedBy] [int] NULL,
	[CreatedDate] [datetime] NULL,
	[IPAdded] [varchar](35) NULL,
 CONSTRAINT [PK_MatchResults] PRIMARY KEY CLUSTERED 
(
	[Id] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]

GO

SET ANSI_PADDING OFF
GO

ALTER TABLE [dbo].[MatchResults]  WITH CHECK ADD  CONSTRAINT [FK_MatchResults_AdminCredential] FOREIGN KEY([CreatedBy])
REFERENCES [dbo].[AdminCredential] ([Id])
GO

ALTER TABLE [dbo].[MatchResults] CHECK CONSTRAINT [FK_MatchResults_AdminCredential]
GO

ALTER TABLE [dbo].[MatchResults]  WITH CHECK ADD  CONSTRAINT [FK_MatchResults_BettingType] FOREIGN KEY([BettingTypeId])
REFERENCES [dbo].[BettingType] ([Id])
GO

ALTER TABLE [dbo].[MatchResults] CHECK CONSTRAINT [FK_MatchResults_BettingType]
GO

ALTER TABLE [dbo].[MatchResults]  WITH CHECK ADD  CONSTRAINT [FK_MatchResults_MatchSchedule] FOREIGN KEY([MatchScheduleId])
REFERENCES [dbo].[MatchSchedule] ([Id])
GO

ALTER TABLE [dbo].[MatchResults] CHECK CONSTRAINT [FK_MatchResults_MatchSchedule]
GO

ALTER TABLE [dbo].[MatchResults]  WITH CHECK ADD  CONSTRAINT [FK_MatchResults_MatchType] FOREIGN KEY([MatchTypeId])
REFERENCES [dbo].[MatchType] ([Id])
GO

ALTER TABLE [dbo].[MatchResults] CHECK CONSTRAINT [FK_MatchResults_MatchType]
GO